/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cc.altius.model;

import java.io.Serializable;
import javax.persistence.*;

/**
 *
 * @author sagar
 */
@Entity
@Table(name = "specialist")
@NamedQueries({
    @NamedQuery(name = "Specialist.findAll", query = "SELECT s FROM Specialist s"),
    @NamedQuery(name = "Specialist.findBySpecialistId", query = "SELECT s FROM Specialist s WHERE s.specialistId = :specialistId"),
    @NamedQuery(name = "Specialist.findByName", query = "SELECT s FROM Specialist s WHERE s.name = :name"),
    @NamedQuery(name = "Specialist.findByMobile", query = "SELECT s FROM Specialist s WHERE s.mobile = :mobile"),
    @NamedQuery(name = "Specialist.findByEmail", query = "SELECT s FROM Specialist s WHERE s.email = :email"),
    @NamedQuery(name = "Specialist.findByContact", query = "SELECT s FROM Specialist s WHERE s.contact = :contact"),
    @NamedQuery(name = "Specialist.findByHospital1", query = "SELECT s FROM Specialist s WHERE s.hospital1 = :hospital1"),
    @NamedQuery(name = "Specialist.findByTiming1", query = "SELECT s FROM Specialist s WHERE s.timing1 = :timing1"),
    @NamedQuery(name = "Specialist.findByHospital2", query = "SELECT s FROM Specialist s WHERE s.hospital2 = :hospital2"),
    @NamedQuery(name = "Specialist.findByTiming2", query = "SELECT s FROM Specialist s WHERE s.timing2 = :timing2"),
    @NamedQuery(name = "Specialist.findByHospital3", query = "SELECT s FROM Specialist s WHERE s.hospital3 = :hospital3"),
    @NamedQuery(name = "Specialist.findByTiming3", query = "SELECT s FROM Specialist s WHERE s.timing3 = :timing3"),
    @NamedQuery(name = "Specialist.findByWalkin", query = "SELECT s FROM Specialist s WHERE s.walkin = :walkin")})
public class Specialist implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "SPECIALIST_ID")
    private Integer specialistId;
    @Column(name = "NAME")
    private String name;
    @Column(name = "MOBILE")
    private String mobile;
    @Column(name = "EMAIL")
    private String email;
    @Column(name = "CONTACT")
    private String contact;
    @Column(name = "HOSPITAL_1")
    private String hospital1;
    @Column(name = "TIMING_1")
    private String timing1;
    @Column(name = "HOSPITAL_2")
    private String hospital2;
    @Column(name = "TIMING_2")
    private String timing2;
    @Column(name = "HOSPITAL_3")
    private String hospital3;
    @Column(name = "TIMING_3")
    private String timing3;
    @Column(name = "WALKIN")
    private String walkin;
    @JoinColumn(name = "HOSPITAL_ID", referencedColumnName = "HOSPITAL_ID")
    @ManyToOne
    private Hospital hospitalId;
    @JoinColumn(name = "SPECIALIST_TYPE_ID", referencedColumnName = "SPECIALIST_TYPE_ID")
    @ManyToOne
    private SpecialistType specialistTypeId;

    public Specialist() {
    }

    public Specialist(Integer specialistId) {
        this.specialistId = specialistId;
    }

    public Integer getSpecialistId() {
        return specialistId;
    }

    public void setSpecialistId(Integer specialistId) {
        this.specialistId = specialistId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getHospital1() {
        return hospital1;
    }

    public void setHospital1(String hospital1) {
        this.hospital1 = hospital1;
    }

    public String getTiming1() {
        return timing1;
    }

    public void setTiming1(String timing1) {
        this.timing1 = timing1;
    }

    public String getHospital2() {
        return hospital2;
    }

    public void setHospital2(String hospital2) {
        this.hospital2 = hospital2;
    }

    public String getTiming2() {
        return timing2;
    }

    public void setTiming2(String timing2) {
        this.timing2 = timing2;
    }

    public String getHospital3() {
        return hospital3;
    }

    public void setHospital3(String hospital3) {
        this.hospital3 = hospital3;
    }

    public String getTiming3() {
        return timing3;
    }

    public void setTiming3(String timing3) {
        this.timing3 = timing3;
    }

    public String getWalkin() {
        return walkin;
    }

    public void setWalkin(String walkin) {
        this.walkin = walkin;
    }

    public Hospital getHospitalId() {
        return hospitalId;
    }

    public void setHospitalId(Hospital hospitalId) {
        this.hospitalId = hospitalId;
    }

    public SpecialistType getSpecialistTypeId() {
        return specialistTypeId;
    }

    public void setSpecialistTypeId(SpecialistType specialistTypeId) {
        this.specialistTypeId = specialistTypeId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (specialistId != null ? specialistId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Specialist)) {
            return false;
        }
        Specialist other = (Specialist) object;
        if ((this.specialistId == null && other.specialistId != null) || (this.specialistId != null && !this.specialistId.equals(other.specialistId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "cc.altius.model.Specialist[ specialistId=" + specialistId + " ]";
    }
    
}
